//
//  ZLPProductCollectionViewCell.m
//  TangYi
//
//  Created by dllo on 15/10/31.
//  Copyright © 2015年 赵连鹏. All rights reserved.
//

#import "ZLPProductCollectionViewCell.h"

@implementation ZLPProductCollectionViewCell

- (void)dealloc {
    [_picImageView release];
    [_priceLabel release];
    [_titleLabel release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.picImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.width)];
        [self.contentView addSubview:self.picImageView];
        [_picImageView release];
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, self.contentView.frame.size.width, self.contentView.frame.size.width - 5, 30)];
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
        
        self.priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.contentView.frame.size.width - 100, self.contentView.frame.size.height - 50, 100, 25)];
        self.priceLabel.textAlignment = NSTextAlignmentRight;
        self.priceLabel.textColor = [UIColor redColor];
        [self.picImageView addSubview:self.priceLabel];
        [_priceLabel release];
    }
    return self;
}

@end
